﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;
using InterfaceComponents;
using DrawableObjects.Actors.Weapons;

namespace DrawableObjects.Actors.Aircrafts 
{
    /// <summary>
    /// This class represents enemy aircrafts which are instantiated by static methods
    /// with given values and a private constructor.
    /// </summary>
    public class FabricatableAircraft : Aircraft
    {
        private Color effectColor
        {
            get;
            set;
        }

        private FabricatableAircraft(Weaponsystem[] weaponsystems, int killScore, Item dropItem, HUDWrapper<int> health, string strModel, Matrix worldMatrix, Color color, float scaleFactor, float boundingFactor)
            : base(weaponsystems, killScore, dropItem, health, strModel, worldMatrix, scaleFactor, boundingFactor)
        {
            this.effectColor = effectColor;
        }

        public static FabricatableAircraft GET_ENEMY_1(Matrix worldMatrix)
        {
            Weaponsystem[] weaponsystems = new Weaponsystem[1] { Weaponsystem.GET_WEAPON_ENEMY(10, new Vector2(0, 10), Color.Green) };
            HUDWrapper<int> health = new HUDWrapper<int>(new List<HUDComponent>());
            health.value = 25;
            FabricatableAircraft enemy1 = new FabricatableAircraft(weaponsystems, 10, null, health, "aircraft_enemy1", worldMatrix, Color.Green, 0.075f, 1);
            enemy1.speed = 0.5f;
            return enemy1;
        }

        public static FabricatableAircraft GET_ENEMY_2(Matrix worldMatrix)
        {
            Weaponsystem[] weaponsystems = new Weaponsystem[1] { Weaponsystem.GET_WEAPON_ENEMY(12, new Vector2(0, 10), Color.Green) };
            HUDWrapper<int> health = new HUDWrapper<int>(new List<HUDComponent>());
            health.value = 50;
            FabricatableAircraft enemy2 = new FabricatableAircraft(weaponsystems, 20, null, health, "aircraft_enemy2", worldMatrix, Color.Green, 0.0085f, 0.7f);
            enemy2.speed = 0.5f;
            return enemy2;
        }

        public static FabricatableAircraft GET_ENEMY_3(Matrix worldMatrix)
        {
            Weaponsystem[] weaponsystems = new Weaponsystem[1] { Weaponsystem.GET_WEAPON_ENEMY(14, new Vector2(0, 10), Color.Green) };
            HUDWrapper<int> health = new HUDWrapper<int>(new List<HUDComponent>());
            health.value = 70;
            FabricatableAircraft enemy3 = new FabricatableAircraft(weaponsystems, 40, null, health, "aircraft_enemy3", worldMatrix, Color.Green, 0.45f, 0.3f);
            enemy3.speed = 0.5f;
            return enemy3;
        }

        public static FabricatableAircraft GET_ENEMY_4(Matrix worldMatrix)
        {
            Weaponsystem[] weaponsystems = new Weaponsystem[1] { Weaponsystem.GET_WEAPON_ENEMY(16, new Vector2(0, 10), Color.Green) };
            HUDWrapper<int> health = new HUDWrapper<int>(new List<HUDComponent>());
            health.value = 90;
            FabricatableAircraft enemy4 = new FabricatableAircraft(weaponsystems, 50, null, health, "aircraft_enemy4", worldMatrix, Color.Green, 0.08f, 0.2f);
            enemy4.speed = 0.7f;
            return enemy4;
        }

        public static FabricatableAircraft GET_ENEMY_5(Matrix worldMatrix)
        {
            Weaponsystem[] weaponsystems = new Weaponsystem[1] { Weaponsystem.GET_WEAPON_ENEMY(18, new Vector2(0, 10), Color.Green) };
            HUDWrapper<int> health = new HUDWrapper<int>(new List<HUDComponent>());
            health.value = 120;
            FabricatableAircraft enemy5 = new FabricatableAircraft(weaponsystems, 70, null, health, "aircraft_enemy5", worldMatrix, Color.Green, 1.3f, 1.5f);
            enemy5.speed = 0.5f;
            return enemy5;
        }

        public override void Update()
        {
            base.Update();
            if (controller != null)
            {
                controller.Update();
            }
        }

        public override void collide(Actor actor2)
        {
            base.collide(actor2);
        }
    }
}

